<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:t="http://myfaces.apache.org/tomahawk">
<ui:composition template="/WEB-INF/templates/plantillaAdmin.xhtml">
	<ui:define name="menu">
		<h:panelGroup>
			<h:form>
				<table width="900" cellpadding="0" cellspacing="0">
					<tr>
						<td width="600" height="40">
							<table width="600" cellpadding="0" cellspacing="0">
								<tr>
									<td class="tabActivo" width="150" height="40"><h:commandLink
											action="irServidores" value="#{msg.servidores}" /></td>
									<td class="tabInactivo" width="150"><h:commandLink
											action="irUsuarios" value="#{msg.usuarios}" /></td>
									<td class="tabInactivo" width="150"><h:commandLink
											action="irTipos" value="#{msg.tipos}" /></td>
									<td width="150" style="border-bottom: 1px solid #2779AA"></td>
									
								</tr>
							</table>
						</td>
						<td width="300" style="border-bottom: 1px solid #2779AA"></td>
					</tr>
				</table>
			</h:form>
		</h:panelGroup>
	</ui:define>
	<ui:define name="content">
		<f:view>
			<h1>#{msg.insertarServidorTitulo}</h1>
			<div class="texto">
				<h:outputText value="#{msg.insertarServidorTexto1}" />
			</div>
			<br />
			<p:panel style="width:450px;">
				<h:form>
					<h:panelGrid columns="3" border="0" cellspacing="6">
						<h:outputText value="#{msg.tipoServidor}" />
						<h:selectOneMenu value="#{servidorBean.servidor.tipo }">
							<f:selectItem itemValue="FTP" itemLabel="FTP" />
							<f:selectItem itemValue="SFTP" itemLabel="SFTP" />
						</h:selectOneMenu>
						<h:outputText value="" />
						<t:outputText value="#{msg.nombre}" />
						<t:inputText value="#{servidorBean.servidor.nombre}"
							maxlenght="255" required="true" id="nombre" />
						<p:message for="nombre" />
						<t:outputText value="#{msg.usuario}" />
						<t:inputText value="#{servidorBean.servidor.usuario}"
							autocomplete="false" required="true" id="usuario" maxlenght="255" />
						<p:message for="usuario" />
						<t:outputText value="#{msg.password}" />
						<t:inputSecret value="#{servidorBean.servidor.password}"
							autocomplete="false" required="true" id="pwd" maxlength="255">
						</t:inputSecret>
						<p:message for="pwd" />
						<t:outputText value="#{msg.repetirPassword}" styleClass="style2" />
						<t:inputSecret id="pwdRepetida" value="#{usuarioBean.usuario.pwd}"
							required="true">
							<t:validateEqual forId="pwd" />
						</t:inputSecret>
						<t:message for="pwdRepetida"
							detailFormat="#{msg.errorConfirmarPassword}" />
						<t:outputText value="#{msg.host}" />
						<t:inputText value="#{servidorBean.servidor.localizacion}"
							required="true" id="localizacion" maxlenght="255" />
						<p:message for="localizacion" />
						<t:outputText value="#{msg.puerto}" />
						<p:spinner id="puerto" value="#{servidorBean.servidor.puerto}"
							max="999999" min="21" required="true" />
						<p:message for="puerto" />
					</h:panelGrid>
					<br />
					<h:commandButton type="submit"
						action="#{servidorBean.insertarServidor}"
						value="#{msg.insertarServidorBoton}"
						onclick="return confirm('#{msg.confirmarInsertarServidor}')" />
				</h:form>
			</p:panel>
		</f:view>
	</ui:define>
</ui:composition>
</html>
